﻿using SIG.Resources.Admin;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace SIG.InputModel.Admin.Case
{
    public class WorkIM
    {
        [Key]
        public int Id { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "Title")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public string Title { get; set; }

        //[Display(ResourceType = typeof(Labels), Name = "Solution")]
        //[Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "RequiredSelect")]
        //public int SolutionId { get; set; }

        //[Display(Name = "ClientName", ResourceType = typeof(Labels))]
        //public int? ClientId { get; set; }

        //[Display(ResourceType = typeof(Labels), Name = "FinishYear")]
        //[Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        //[RegularExpression(@"^-?\d*$", ErrorMessageResourceType = typeof(Labels), ErrorMessageResourceName = "FormatInvalid")]
        //public int FinishYear { get; set; }    

        [Display(ResourceType = typeof(Labels), Name = "Description")]
        public string Abstract { get; set; }

        [Display(Name = "Content", ResourceType = typeof(Labels))]
        [AllowHtml]
        public string Body { get; set; }
           

        [Display(Name = "Thumbnail", ResourceType = typeof(Labels), Prompt = "Required")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public string Thumbnail { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "ImageURL")]
        public string ImageUrl { get; set; }

        //[Display(Name = "Demourl", ResourceType = typeof(Labels))]
        //[Url(ErrorMessageResourceType = typeof(Labels), ErrorMessageResourceName = "FormatInvalid", ErrorMessage = null)]
        //public string Demourl { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "Recommend")]
        public bool Recommend { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "Active")]
        public bool Active { get; set; }
        public int ViewCount { get; set; }
        //public string CategoryIds { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "Category")]
        public string[] CategoryIds { get; set; }

        /*        public virtual ICollection<WorkCategoryIM> WorkTypes { get; set;} */
        [Display(ResourceType = typeof(Labels), Name = "Title")]
    public string SEOTitle { get; set; }

    [Display(ResourceType = typeof(Labels), Name = "KeyWords")]
        public string Keywords { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "Description")]
        public string SEODescription { get; set; }
    }
}
